﻿using System.Linq;
using DBContract.Abstract;
using NHibernate;
using NHibernate.Linq;

namespace DBContract.Domain
{
    public class DBRepository<T> : IDBRepository<T> where T:class 
    {
        protected ISession CurrentSession;

        public DBRepository(ISession session)
        {
            CurrentSession = session;
        } 

        public object Create(T obj)
        {
            throw new System.NotImplementedException();
        }

        public object CreateOfUpdate(T obj)
        {
            throw new System.NotImplementedException();
        }

        public object Update(T obj)
        {
            throw new System.NotImplementedException();
        }

        public void Delete(T obj)
        {
            throw new System.NotImplementedException();
        }

        public IQueryable<T> Query()
        {
            return CurrentSession.Query<T>();
        }

        public long Count()
        {
            throw new System.NotImplementedException();
        }
    }
}
